package com.example.service.impl;

import com.example.entity.StuInformation;
import com.example.entity.Student;
import com.example.mapper.StudentMapper;
import com.example.service.StudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cyk
 * @since 2022-02-19
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Autowired
    StudentMapper studentMapper;

    @Override
    public Student studentById(Long id) {
        return studentMapper.studentById(id);
    }

    @Override
    public boolean updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public int saveStudent(Long userId) {
        return studentMapper.saveStudent(userId);
    }

    @Override
    public int deleteStudent(Long id) {
        return studentMapper.deleteStudent(id);
    }

    @Override
    public StuInformation stuInformation(Long id) {
        return studentMapper.stuInformation(id);
    }
}
